import * as THREE from 'three'

// const pointsArr = [
//     new THREE.Vector2(100, 0),
//     new THREE.Vector2(50, 20),
//     new THREE.Vector2(0, 0),
//     new THREE.Vector2(0, 50),
//     new THREE.Vector2(50, 100)
// ];

const shape = new THREE.Shape();
shape.moveTo(100, 0)
shape.lineTo(0, 0)
shape.lineTo(0, 50)
shape.lineTo(80, 100)

const path = new THREE.Path()
path.arc(60, 60, 10)
const path2 = new THREE.Path()
path2.arc(30, 30, 10)
const path3 = new THREE.Path()
path3.arc(60, 30, 10)
shape.holes.push(path, path2, path3)

// const geometry = new THREE.ShapeGeometry(shape)
const geometry = new THREE.ExtrudeGeometry(shape, {
    depth: 100
})
const material = new THREE.MeshLambertMaterial({
    color: new THREE.Color('lightgreen')
});

const mesh = new THREE.Mesh(geometry, material);

export default mesh
